#pragma once

#include "../flatform/EPaint.h"

class Device {
public:
	Device() {
		hWnd = NULL;
	}
	HWND hWnd;
};

/////////////////////////////////
//for OpenGL
#include <gl\gl.h>			// Header File For The OpenGL32 Library
#include <gl\glu.h>			// Header File For The GLu32 Library

// This is the lazy adding libraries via #pragma rather than in linker includes
// If you are not on visual studio you will need to add the librarys via your linker
#pragma comment(lib,"ComCtl32.lib")
#pragma comment(lib,"OpenGl32.lib")
#pragma comment(lib,"GLU32.lib")


static const TCHAR* DATABASE_PROPERTY = "OurDataStructure";

//OpenGL Data Structure
typedef struct OpenGLData {
	HGLRC Rc;											// Our render context ** Always Needed
	GLuint glTexture;									// Our texture to draw
	GLfloat	xrot;										// X Rotation
	GLfloat	yrot;										// Y Rotation
} GLDATABASE;


HGLRC InitGL(HWND Wnd);
void ReSizeGLScene(HWND Wnd);
GLuint BMP2GLTexture(TCHAR* fileName, HWND Wnd, GLDATABASE* db);
void DrawGLScene(GLDATABASE* db, HDC Dc);
/////////////////////////////////


#define DEBUG_GRADE_1	0x01
#define DEBUG_GRADE_2	0x02
#define DEBUG_GRADE_3	0x03
#define DEBUG_GRADE_4	0x04

VOID Initialize();
VOID onPaint(HWND hWnd);
VOID onTimer();
VOID onClose();
VOID onKeyDown(WPARAM wParam);
VOID onKeyUp(WPARAM wParam);
VOID onResize(FLOAT width, FLOAT height);
VOID onScroll(FLOAT delta);
VOID onMenu(FLOAT x, FLOAT y, INT mode);
VOID onDrag(FLOAT x, FLOAT y, INT mode);
INT isInputBlocked();
